//
// Created by 董一龙 on 2022/10/13.
//

#ifndef FQUEUE_MMAP_H
#define FQUEUE_MMAP_H
#include <string>
#include <cstddef>

namespace fqueue {
namespace mmaplib {
    class mmap {
    public:
        mmap(std::string const& filename, size_t mmap_size);
        ~mmap();

        [[nodiscard]] void *data() const;
        [[nodiscard]] size_t size() const;

    private:
        size_t m_size;
        void *m_addr;
    };
}


} // fqueue

#endif //FQUEUE_MMAP_H
